
// 路由集合(PC)
const routes = [
    { // 配置默认路由
        path: "/", // 路由地址
        redirect: "/index" // 重定向
    },
    {
        path: '/index',
        name: 'Index',
        meta: { title: '页头' },
        component: () => import("@/views/client/index.vue"),
        children: [
            {
                path: '',
                redirect: '/index/front'
            }
            ,
            {
                path: '/index/front',
                name: 'FontPage',
                meta: { title: '首页' },
                component: () => import("@/views/client/front/index.vue"),
            },
            {
                path: '/index/good_details',
                name: 'GoodDetails',
                meta: { title: '商品详情' },
                component: () => import("@/views/client/goods_details/index.vue"),
            },
            {
                path: '/index/goods',
                name: 'Goods',
                meta: { title: '商品货源' },
                component: () => import("@/views/client/goods/index.vue")
            },
            {
                path: '/index/purchase',
                name: 'Purchase',
                meta: { title: '求购需求' },
                component: () => import("@/views/client/purchase/index.vue")
            },
            {
                path: '/index/knowledge',
                name: 'Knowledge',
                meta: { title: '农业知识' },
                component: () => import("@/views/client/knowledge/index.vue")
            },
            {
                path: '/index/knowledge_details/:id',
                name: 'KnowledgeDetails',
                meta: { title: '农业知识详情' },
                component: () => import("@/views/client/knowledge_details/index.vue")
            },
            {
                path: '/index/guide',
                name: 'Guide',
                meta: { title: '专家指导' },
                component: () => import("@/views/client/guide/index.vue")
            },
            {
                path: '/index/guide_details/:id',
                name: 'GuideDetails',
                meta: { title: '专家指导详情' },
                component: () => import("@/views/client/guide_details/index.vue")
            },
            {
                path: '/index/question',
                name: 'Question',
                meta: { title: '提问专家' },
                component: () => import("@/views/client/question/index.vue")
            },
            {
                path: '/index/all_experts',
                name: 'AllExperts',
                meta: { title: '专家列表' },
                component: () => import("@/views/client/all_experts/index.vue")
            },
            {
                path: '/index/appointment',
                name: 'Appointment',
                meta: { title: '专家预约' },
                component: () => import("@/views/client/appointment/index.vue")
            },
            {
                path: '/index/shopcart',
                name: 'ShopCart',
                meta: { title: '购物车' },
                component: () => import("@/views/client/shopcart/index.vue")
            },
            {
                path: '/index/about_us',
                name: 'AboutUs',
                meta: { title: '关于我们' },
                component: () => import("@/views/client/about_us/index.vue")
            },
            {
                path: '/index/financing',
                name: 'Financing',
                meta: { title: '融资推荐' },
                component: () => import("@/views/client/financing/index.vue")
            },
            {
                path: '/index/financingDetails',
                name: 'FinancingDetails',
                meta: { title: '融资信息' },
                component: () => import("@/views/client/financing_details/index.vue")
            },
            {
                path: '/index/user',
                name: 'User',
                meta: { title: '用户中心' },
                component: () => import("@/views/client/user/index.vue"),
                children: [
                    {
                        path: '',
                        redirect: '/index/user/user_info'
                    },
                    {
                        path: '/index/user/user_info',
                        name: 'UserInfo',
                        meta: { title: '用户信息' },
                        component: () => import("@/views/client/user_info/index.vue")
                    },
                    {
                        path: '/index/user/user_password',
                        name: 'UserPassword',
                        meta: { title: '修改密码' },
                        component: () => import("@/views/client/user_password/index.vue")
                    },
                    {
                        path: '/index/user/user_expert_info',
                        name: 'UserExpertInfo',
                        meta: { title: '专家信息' },
                        component: () => import("@/views/client/user_expert_info/index.vue")
                    },
                    {
                        path: '/index/user/publishedgoods',
                        name: 'PublishedGoods',
                        meta: { title: '我的商品' },
                        component: () => import("@/views/client/publishedgoods/index.vue")
                    },
                    {
                        path: '/index/user/publishedneeds',
                        name: 'PublishedNeeds',
                        meta: { title: '我的求购' },
                        component: () => import("@/views/client/publishedneeds/index.vue")
                    },
                    {
                        path: '/index/user/expertQuestion',
                        name: 'ExpertQuestion',
                        meta: { title: '我的提问' },
                        component: () => import("@/views/client/expert_question/index.vue")
                    },
                    {
                        path: '/index/user/expertAppoint',
                        name: 'ExpertAppoint',
                        meta: { title: '我的预约' },
                        component: () => import("@/views/client/expert_appoint/index.vue")
                    },
                    {
                        path: '/index/user/publishedknowledges',
                        name: 'PublishedKnowledges',
                        meta: { title: '发布知识' },
                        component: () => import("@/views/client/expert_published_knowledges/index.vue")
                    },
                    {
                        path: '/index/user/user_buy',
                        name: 'UserBuy',
                        meta: { title: '我买的' },
                        component: () => import("@/views/client/user_buy/index.vue")
                    },
                    {
                        path: '/index/user/user_sell',
                        name: 'UserSell',
                        meta: { title: '我卖的' },
                        component: () => import("@/views/client/user_sell/index.vue")
                    },
                    {
                        path: '/index/user/user_manager',
                        name: 'UserManager',
                        meta: { title: '我的订单' },
                        component: () => import("@/views/client/user_manager/index.vue")
                    },
                    {
                        path: '/index/user/user_finance',
                        name: 'UserFinance',
                        meta: { title: '我的融资' },
                        component: () => import("@/views/client/user_finance/index.vue")
                    }
                ]
            },
        ]
    },
    {
        path: '/login',
        name: 'Login',
        meta: { title: '登录' },
        component: () => import("@/views/public/login/index.vue"),
    },
    {
        path: '/register',
        name: 'Register',
        meta: { title: '注册' },
        component: () => import("@/views/public/register/index.vue"),
    },
]

export default routes
